#ifndef NORM_STEPTEST_H
#define NORM_STEPTEST_H

#include "ct_step/abstract/ct_abstractstep.h"
#include "ct_pointcloudindex/ct_pointcloudindexvector.h"

/*!
 * \class NORM_StepTest
 * \ingroup Steps_NORM
 * \brief <b>toto.</b>
 *
 * titi
 *
 *
 */

class NORM_StepTest: public CT_AbstractStep
{
    Q_OBJECT

public:

    /*! \brief Step constructor
     * 
     * Create a new instance of the step
     * 
     * \param dataInit Step parameters object
     */
    NORM_StepTest(CT_StepInitializeData &dataInit);

    /*! \brief Step description
     * 
     * Return a description of the step function
     */
    QString getStepDescription() const;

    /*! \brief Step detailled description
     * 
     * Return a detailled description of the step function
     */
    QString getStepDetailledDescription() const;

    /*! \brief Step URL
     * 
     * Return a URL of a wiki for this step
     */
    QString getStepURL() const;

    /*! \brief Step copy
     * 
     * Step copy, used when a step is added by step contextual menu
     */
    CT_VirtualAbstractStep* createNewInstance(CT_StepInitializeData &dataInit);

protected:

    /*! \brief Input results specification
     * 
     * Specification of input results models needed by the step (IN)
     */
    void createInResultModelListProtected();

    /*! \brief Parameters DialogBox
     * 
     * DialogBox asking for step parameters
     */
    void createPostConfigurationDialog();

    /*! \brief Output results specification
     * 
     * Specification of output results models created by the step (OUT)
     */
    void createOutResultModelListProtected();

    /*! \brief Algorithm of the step
     * 
     * Step computation, using input results, and creating output results
     */
    void compute();

    /*! \brief Algorithm QuickSort
     *
     * Extract median value
     */

    /*unsigned int QuickSort(CT_ABSTRACT_PCIR inputPointCloud,CT_PointCloudIndexVector indexPoint,unsigned int g,unsigned int d,int axeCoordAtrier);*/

    unsigned int sortPointsFromPivot(CT_ABSTRACT_MPCIR outSortedIndexCloudPtr,unsigned int sortFirstIndex,unsigned int sortLastIndex,float pivot,int sortAxis );
    void sortPointsFromPivot2(CT_ABSTRACT_MPCIR indexPointRe, unsigned int* a, unsigned int* b,unsigned int* c,unsigned int* d,unsigned int* e,unsigned int* f,unsigned int* g);
private:

    // Step parameters
    // No parameter for this step
};

#endif // NORM_STEPTEST_H
